package com.sunrise.generico.entidade;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

import com.sunrise.generico.entidade.iface.EntidadeNegocio;

@Entity
@Table(name = "endereco")
public class Endereco implements EntidadeNegocio {

	/**
	 * 
	 */
	private static final long serialVersionUID = -307041236011097321L;

	@Id
	@SequenceGenerator(name="pk_sequence",sequenceName="endereco_id_seq", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="pk_sequence")
	@javax.persistence.Column
	@Getter @Setter
	private Long id;
	
	@Column(name = "endereco", length = 100)
	@Getter @Setter
	private String endereco;
	
	@Column(name = "numero", length = 10)
	@Getter @Setter
	private String numero;
	
	@Column(name = "bairro", length = 100)
	@Getter @Setter
	private String bairro;
	
	@Column(name = "complemento", length = 200)
	@Getter @Setter
	private String complemento;
	
	@Column(name = "cep", length = 12)
	@Getter @Setter
	private String cep;
	
	@OneToOne
	@Getter @Setter
	private Cidade cidade;
	
}
